Ext.define('DragonApp.view.monster.Grid', {
    extend: 'Ext.grid.Panel',

    alias: ['widget.monstergrid'],

    requires: [
        'DragonApp.store.JsonPMonster',
        'DragonApp.view.monster.FilterBar',
        'DragonApp.view.monster.ItemBar'
    ],

    controller: 'monster',

    dockedItems: [{
        xtype: 'monster-filter',
        itemId: 'monster-filter',
        dock: 'top'
    }, {
        xtype: 'monster-filter-items',
        itemId: 'filter-items',
        dock: 'top'
    }],
    columns: {
        defaults: {
            width: 100,
            align: 'center'
        },
        items: [
            { text: '序号', xtype: 'rownumberer', width: 90 },
            { text: '佣兵名称', dataIndex: 'monsterid' },
            { text: '定位', dataIndex: 'location', width: 80 },
            { text: '品质', dataIndex: 'quality', width: 80 },
            { text: '怒气消耗', dataIndex: 'need_angry', width: 80 },
            { text: '拥有数量', dataIndex: 'employ_count', width: 80 },
            { text: '雇佣状态', dataIndex: 'status', width: 80, renderer: 'yesNoStatusRender' },
            { text: '星级', dataIndex: 'level', width: 80 },
            { text: '生命符文', dataIndex: 'being', renderer: 'yesNoStatusRender' },
            { text: '攻击符文', dataIndex: 'attack', renderer: 'yesNoStatusRender' },
            { text: '防御符文', dataIndex: 'defense', renderer: 'yesNoStatusRender' },
            { text: '速度符文', dataIndex: 'speed', renderer: 'yesNoStatusRender', flex: 1 }
        ]
    },
    store: {
        type: 'jsonPmonsterStore',
        storeId : 'jsonPmonsterStore'
    }
});